//
//  Protocol.c
//  Wi-Fi Party remade-1
//
//  Created by Vieta Ken on 2021/4/16.
//

#import <Foundation/Foundation.h>


struct headers{
    unsigned int version_number;
    NSTimeInterval time;
};

struct buffer{
    unsigned char *start;
    unsigned int length;
};

struct partyPacket{
    struct headers* header;
    struct buffer audioPayload;
};

struct partyPacket* parsePacket(char* receivedPacket, int length);
struct partyPacket* createPacket(int dataLength);
void freePacket(struct partyPacket *packet);
